const findLongestWordLength = str => {
  const words = str.split(" ");
  let longest = 0;
  for (const word of words) {
    longest = longest > word.length? longest: word.length;
  }
  return longest;
}

console.log(findLongestWordLength("The quick brown fox jumped over the lazy dog"));